<template>
	<div>
		<Select clearable v-model="request.id" placeholder="请选择机器" style="width: 100%;">
			<Option :value="item.id" v-for="(item,index) in data1" :key="index">{{item.name}}</Option>
		</Select>
	</div>

</template>

<script>
	export default {
		data() {
			return {
				width: this.$store.state.width,
				height: this.$store.state.height,
				loading: false,
				request: {
					id: '',
					loading:false
				},
				codeImg: '',
				modal2: false,
				modal3: false,
				columns1: [],
				tableData: [],
				page: {},
				modalLoading: true,
				modal1: false,
				form: {
					id: null,
					// username: "",
					// email: ""
				},
				data1: [],
				selectID: [],
				content: ''
			};
		},
		created() {
			this.getequipmentlist();
		},
		methods: {
			
			selectChange(selection) {
				console.log('选项发生改变', selection)
				this.selectID = [];
				selection.forEach(item => {
					this.selectID.push(item.id)
				})

				if (this.selectID.length > 0) {
					this.showDel = true
				} else {
					this.showDel = false
				}

				console.log(this.selectID)


			},

			getequipmentlist() { //机器
				this.axios.post("device/device_list").then(res => {
					if (res.code == 1) {
						this.data1 = res.data.list; 
					}
				});
			},

				submitok() { //确定跳转
			},
	
	
			cancel() {
				this.form = {
					id: null,
					name: ""
				};
			}
		}
	};
</script>

<style scoped>
	.spec_item {
		display: flex;
		align-items: center;
		margin-bottom: 10px;
	}

	.spec_item .input {
		width: 200px;
	}

	.spec_item button {
		margin-left: 10px;
	}
</style>
